//
//  StarView.h
//  Mdongying
//
//  Created by mac pro -chenweishuai on 14-3-10.
//  Copyright (c) 2014年 伟帅陈. All rights reserved.
//

#import <UIKit/UIKit.h>

@class StarView;

typedef void(^finishBlock)(CGFloat currentScore);

typedef NS_ENUM(NSInteger, RateStyle)
{
    WholeStar = 0, //只能整星评论
    HalfStar = 1,  //允许半星评论
    IncompleteStar = 2  //允许不完整星评论
};

@protocol XHStarRateViewDelegate <NSObject>

-(void)starRateView:(StarView *)starRateView currentScore:(CGFloat)currentScore;

@end

@interface StarView : UIView

@property (nonatomic,assign)BOOL isAnimation;       //是否动画显示，默认NO
@property (nonatomic,assign)RateStyle rateStyle;    //评分样式    默认是WholeStar
@property (nonatomic, weak) id<XHStarRateViewDelegate>delegate;
@property(nonatomic,assign)id StarDelegate;
@property (nonatomic,assign)CGFloat currentScore;   // 当前评分：0-5  默认0
@property (nonatomic,strong)NSString *startype;   // 当前评分：0-5  默认0


-(instancetype)initWithFrame:(CGRect)frame numberOfStars:(NSInteger)numberOfStars rateStyle:(RateStyle)rateStyle isAnination:(BOOL)isAnimation delegate:(id)delegate;
-(instancetype)initWithFrame1:(CGRect)frame numberOfStars:(NSInteger)numberOfStars rateStyle:(RateStyle)rateStyle isAnination:(BOOL)isAnimation delegate:(id)delegate;


@end
